package com.bh.wms.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.util.Date;
import java.util.List;

/**
 * 盘点单
 *
 * @author GPT
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wms_stocktake_order")
@ApiModel(value = "盘点单", description = "库存盘点任务")
public class WmsStocktakeOrder extends BhtmsBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("盘点单号")
    @Excel(name = "盘点单号")
    private String orderNo;

    @ApiModelProperty("盘点类型 全盘/抽盘/循环")
    @Excel(name = "盘点类型")
    private String stocktakeType;

    @ApiModelProperty("盘点范围 仓库ID")
    @Excel(name = "仓库ID")
    private Long warehouseId;

    @ApiModelProperty("盘点库区")
    @Excel(name = "库区ID")
    private Long zoneId;

    @ApiModelProperty("状态 created/executing/review/closed")
    @Excel(name = "状态")
    private String orderStatus;

    @ApiModelProperty("计划开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planStartTime;

    @ApiModelProperty("计划结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planEndTime;

    @ApiModelProperty("实际开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualStartTime;

    @ApiModelProperty("实际结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date actualEndTime;

    @ApiModelProperty("差异数量")
    @Excel(name = "差异数量")
    private Integer differenceQuantity;

    @ApiModelProperty("差异金额")
    @Excel(name = "差异金额")
    private Double differenceAmount;

    @TableField(exist = false)
    @ApiModelProperty("盘点明细")
    private List<WmsStocktakeDetail> details;
}

